package com.waimai1.waimai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.waimai1.waimai.common.BaseContext;
import com.waimai1.waimai.dao.ChoujiangResDao;
import com.waimai1.waimai.entity.ChoujiangRes;
import com.waimai1.waimai.entity.User;
import com.waimai1.waimai.service.ChoujiangResService;
import org.springframework.stereotype.Service;

/**
 * (ChoujiangRes)表服务实现类
 *
 * @author makejava
 * @since 2023-12-22 10:55:24
 */
@Service("choujiangResService")
public class ChoujiangResServiceImpl extends ServiceImpl<ChoujiangResDao, ChoujiangRes> implements ChoujiangResService {
    @Override
    public int getCount(int id){
        LambdaQueryWrapper<ChoujiangRes> chouResLambdaQueryWrapper=new LambdaQueryWrapper<>();
        chouResLambdaQueryWrapper.eq(ChoujiangRes::getChoujiangId,id)
                .eq(ChoujiangRes::getAcid, BaseContext.getAcid())
                .eq(ChoujiangRes::getOpenid, BaseContext.getopenId());
        int count=this.count(chouResLambdaQueryWrapper);
        return count;
    }
}

